package com.longshihan.carservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@MapperScan("com.longshihan.carservice.dao")
@EnableSwagger2
@RestController
public class CarserviceApplication {
	@Autowired
	private Environment env;

	public static void main(String[] args) {
		SpringApplication.run(CarserviceApplication.class, args);
	}

	@RequestMapping("/")
	public String home() {
		return "Hello Docker World"+env.getProperty("profile");
	}


}
